package zuoye.zuoye1;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        String[] arr = {"高启强", "高启盛", "高玉兰", "高育良", "高明远", "高玉琴", "高赫" };

        int index;

        while (true) {
            try {
                Scanner sc = new Scanner(System.in);
                System.out.println("请输入1-6之间的数字：");
                index = sc.nextInt();

                if (index >= 1 && index <= 6){
                    System.out.println(arr[index-1]+"请开始表演");
                    break;
                }else {
                    System.out.println("输入的数字有误，请重新输入");
                }
            }catch (Exception e){
                System.out.println("请输入正确的数字");

            }

        }


    }
}

